import page from "./page";
const allLang= {
  global:{
    platName:['融合视频服务平台','STARTIMES IPTV PLATFORM'],
    notFound:['抱歉，你访问的页面未找到','Sorry, the page you visited does not exist.'],
    back:['返回','Back'],
    backHome:['返回首页','Back to Home'],
    detail:['详情','detail'],
    confirm:['确定','confirm'],
    cancel:['取消','cancel'],
    save:['保存','save'],
    submit:['提交','submit'],
    operate:['操作','Operation'],
    edit:['编辑','edit'],
    delete:['删除','delete'],
    choice:['选择','choice'],
    pleaseSelect:['请选择','please select'],
    confirmDelete:['是否确认删除 ','Do you confirm to delete it '],
    confirmDeleteSelect:['是否确认删除所选内容','Do you confirm to delete you selection '],
    deleteSuccess:['删除成功','delete successfully'],
    pleEnt:['请输入','please enter'],
    pleSel:['请选择','please select'],
    upload:['上传','Upload'],
    uploadTypeErr:['上传文件格式有误，请重新上传','The format of the uploaded file is incorrect. Please upload it again'],
    uploading:['正在上传','uploading'],
    generateSuccess:['生成成功','generate success'],
    uploadSuccess:['上传成功','upload success'],
    uploadError:['上传失败','upload error'],
    upLoadVideoTip:['提示信息','confirm info'],
    doNotSupportFormatting:['所选文件中包含不支持的文件格式','The selected files contain unsupported file formats.'],
    makeSureToGiveUp: ['列表中有未上传完成的文件，确定要放弃上传吗?','There are files in the list have not been uploaded. Are you sure to abandon the uploading?'],
    recheckTip: ['请检查数据再次提交','Please check the data and commit again.'],
    stay: ['留下','stay'],
    leave: ['离开','leave'],
    saveSucc: ['保存成功','saved successfully'],
    changeSucc: ['修改成功','change successfully'],
    operateSucc: ['操作成功','operate successfully'],
    cancelSucc: ['取消成功','cancel successfully'],
    saveErr: ['保存失败','save failed'],
    add: ['新增','add'],
    add2: ['添加','add'],
    batchAdd:['批量添加', 'batch add'],
    addSucc:['添加成功', 'add successfully'],
    enterInteger: ['请输入正整数','please enter integer'],
    notBigthan: ['输入数字不得大于','The value cannot be greater than or equal to'],
    notEmpty: ['输入不能为空','The input cannot be empty'],
    search: ['查询','search'],
    reset: ['重置','reset'],
    yes: ['是','yes'],
    no: ['否','no'],
    open: ['开','open'],
    close: ['关','close'],
    notSupportChinese: ['不支持中文字符','Chinese characters are not supported.'],
    phoneticizeErr: ['拼音格式输入不正确','Incorrect input of phoneticize format.'],
    example: ['例如','example'],
    week1: ['星期一','Monday'],
    week2: ['星期二','Tuesday'],
    week3: ['星期三','Wednesday'],
    week4: ['星期四','Thursday'],
    week5: ['星期五','Friday'],
    week6: ['星期六','Saturday'],
    week7: ['星期日','Sunday'],
    tip: ['提示信息','prompt message'],
    editCheckTip:['修改内容未保存，请选择提交或返回','The edit/modified content was not saved. Please choose to submit or return'],
    editLeaveTip:['编辑的信息未保存，离开后数据将丢失。请确认是否离开？','The edited information is not saved and data will be lost after leaving. Please confirm whether to leave?'],
    moneyErr: ['金额格式有误','Incorrect amount format'],
    minute: ['分钟','minute'],
    formatErr: ['格式有误','Wrong format'],
  },
  ...page
}

// console.log('allLang',allLang)
let messages = {en: {}, ch: {}};

for (const key in allLang) {
  messages.ch[key]={}
  messages.en[key]={}
  for (const j in allLang[key]) {
    if (allLang[key][j] instanceof Array){
      if(allLang[key][j][0])messages.ch[key][j]=allLang[key][j][0];
      if(allLang[key][j][1])messages.en[key][j]=allLang[key][j][1];
    }else {
      messages.ch[key][j]={}
      messages.en[key][j]={}
      for(const k in allLang[key][j]){
        if(allLang[key][j][k][0])messages.ch[key][j][k]=allLang[key][j][k][0];
        if(allLang[key][j][k][1])messages.en[key][j][k]=allLang[key][j][k][1];
      }
    }
  }
}

export {
  messages
}
